# docker build dir: tcec-charge-collector
# 基础镜像
FROM  openjdk:8-jre
# author
LABEL maintainer="forward"
ENV TZ=Asia/Shanghai

# 挂载目录
VOLUME /opt/charge-collector
# 创建目录
RUN mkdir -p /opt/charge-collector/config
# 指定路径
WORKDIR /opt/charge-collector
# 复制jar和配置文件到路径
COPY ./target/*charge-collector*.jar /opt/charge-collector/charge-collector.jar
# COPY ./target/classes/application.yml /opt/charge-collector/config/application.yml
# 启动系统服务
ENTRYPOINT ["java","-jar","charge-collector.jar"]